/* -------------------------
 * Denise Pollock
 * Homework 3
 * 7/8/14
 * testing supplyCount function
 * -------------------------
 */

#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "rngs.h"

int main() 
{
  struct gameState state;
  int maxHandCount = 5;
  int numPlayer = 2;
  int handCount, p, r, i;
  int seed = 1000;
  int k[10] = {adventurer, council_room, feast, gardens, mine, remodel, smithy, village, baron, great_hall};
  
  printf ("TESTING supplyCount():\n");
  memset(&state, 23, sizeof(struct gameState));
  r = initializeGame(numPlayer, k, seed, &state);

  for (i = 0; i<10; i++)
  {
	  state.supplyCount[k[i]] = 20;
	  p = supplyCount(k[i], &state);
	  assert(p == 20);
  }
  printf("All tests pass for a value of 20\n");

  for (i=0; i<10; i++)
  {
	  state.supplyCount[k[i]] = 50;
	  p = supplyCount(k[i], &state);
	  assert(p == 50);
  }
  printf("All tests pass for a value of 50\n");

  for (i=0; i<10; i++)
  {
	  state.supplyCount[k[i]] = 100;
	  p = supplyCount(k[i], &state);
	  assert(p == 100);
  }
  printf("All tests pass for a value of 100\n");

  for (i=0; i<10; i++)
  {
	  state.supplyCount[k[i]] = 500;
	  p = supplyCount(k[i], &state);
	  assert(p == 500);
  }
  printf("All tests pass for a value of 500\n");
}


